package com.i2863.receipt.exception;

import com.i2863.receipt.controller.ApiStatus;

/**
 * 业务异常类
 * @author xuweiwei
 * @date 2018/6/15
 */
public class ServiceException extends RuntimeException {
    private ApiStatus apiStatus;

    public ServiceException(ApiStatus apiStatus) {
        this.apiStatus = apiStatus;
    }

    public ServiceException(String message, ApiStatus apiStatus) {
        super(message);
        this.apiStatus = apiStatus;
    }
    public ServiceException(Throwable cause,ApiStatus apiStatus) {
        super(cause);
        this.apiStatus = apiStatus;
    }

    public ServiceException(String message, Throwable cause, ApiStatus apiStatus) {
        super(message, cause);
        this.apiStatus = apiStatus;
    }


    public ServiceException() {
    }

    public ServiceException(String message) {
        super(message);

    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }


    public ApiStatus getApiStatus() {
        return apiStatus;
    }
}
